<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <jsp:include page="../common/header.jsp" />
    <script type="text/javascript">
        function saveScore() {
            $saveScore = $("input[name=saveScore]");
            $saveScore.bind("click", function () {
                if ($("input[name='stuXueHaos']:checked").length > 0) {
                    $("#form1").submit();
                }
                else {
                    alert("您没有勾选任何复选框，系统将不会进行任何操作");
                }
            });
        }
        $(function () {
            saveScore();
        });
    </script>
    <jsp:include page="../common/mycss.jsp" />
</head>
<body>
<div class="lyear-layout-web">
    <div class="lyear-layout-container">
        <!--左侧导航-->
        <aside class="lyear-layout-sidebar">
            <!-- logo -->
            <div id="logo" class="sidebar-header">
                <jsp:include page="../common/title.jsp" />
            </div>
            <div class="lyear-layout-sidebar-scroll">
                <jsp:include page="../common/menu.jsp" />
            </div>
        </aside>
        <!--End 左侧导航-->
        <jsp:include page="../common/top.jsp" />
        <!--页面主要内容-->
        <main class="lyear-layout-content">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-lg-12">
                        <div class="card">
                            <div class="card-toolbar clearfix">
                                <h5>成绩管理——成绩删除</h5>
                            </div>
                            <div class="card-body">
                                <div id="accordion">
                                    <div align="center">
                                        <strong><s:property value="grade.year"/>届<s:property value="grade.name"/>（<s:property value="grade.classID"/>）班所有学生第<s:property value="xueqi"/>学期<s:property
                                                value="course.name"/>科目成绩删除界面</strong>
                                        <hr/>
                                        <form action="scoreDeleteResultGradeSuc.action" method="post" id="form1">
                                            <table class="datalist">
                                                <caption style="text-align: center">科目满分：<span><s:property value="course.score"/></span></caption>
                                                <tr>
                                                    <th>学生学号</th>
                                                    <th>学生姓名</th>
                                                    <th>最终成绩</th>
                                                    <th>选择删除</th>
                                                </tr>
                                                <s:iterator value="idNameScores" status="st">
                                                    <s:if test="#st.Even">
                                                        <tr class="altrow">
                                                            <td><s:property value="stuXueHao"/></td>
                                                            <td><s:property value="name"/></td>
                                                            <td><s:property value="score"/></td>
                                                            <td><input type="checkbox" name="stuXueHaos" value='<s:property value="stuXueHao" />'/></td>
                                                        </tr>
                                                    </s:if>
                                                    <s:else>
                                                        <tr>
                                                            <td><s:property value="stuXueHao"/></td>
                                                            <td><s:property value="name"/></td>
                                                            <td><s:property value="score"/></td>
                                                            <td><input type="checkbox" name="stuXueHaos" value='<s:property value="stuXueHao" />'/></td>
                                                        </tr>
                                                    </s:else>
                                                </s:iterator>
                                                <tr>
                                                    <td colspan="4"><input type="button" name="saveScore" value="删除选择项"/></td>
                                                </tr>
                                            </table>
                                            <input type="hidden" value='<s:property value="xueqi" />' name="xueqi"/>
                                            <input type="hidden" value='<s:property value="examType" />' name="examType"/>
                                            <input type="hidden" value='<s:property value="courseID" />' name="courseID"/>
                                            <input type="hidden" value='<s:property value="grade.bianHao" />' name="gradeID"/>
                                        </form>
                                        <hr/>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                </div>

            </div>

        </main>
        <!--End 页面主要内容-->
    </div>
</div>
</body>
</html>
